<template>
  <div>
    <div class="area">
      <myTitle
        name="应用领域"
        nameColor="#fff"
        EngName="APPLICATION AREA"
        EngNameColor="#fff"
        background="#fff"
      ></myTitle>
      <div class="swiper-father">
        <div class="swiper-container">
          <div class="swiper-wrapper">
            <div class="swiper-slide">
              <img src="../img/territory-1.jpg" />
              <div class="item-txt">
                <h4>VR 领域</h4>
                <span></span>
                <p style="color: #ccc">VR FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-2.jpg" />
              <div class="item-txt">
                <h4>电脑领域</h4>
                <span></span>
                <p style="color: #ccc">COMPUTER FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-3.jpg" />
              <div class="item-txt">
                <h4>电视领域</h4>
                <span></span>
                <p style="color: #ccc">TELEVISION FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-4.jpg" />
              <div class="item-txt">
                <h4>透明显示</h4>
                <span></span>
                <p style="color: #ccc">TRANSPARENT DISPLAY</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-5.jpg" />
              <div class="item-txt">
                <h4>汽车领域</h4>
                <span></span>
                <p style="color: #ccc">AUTOMOTIVE FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-6.jpg" />
              <div class="item-txt">
                <h4>手机领域</h4>
                <span></span>
                <p style="color: #ccc">MOBILE PHONE FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-7.jpg" />
              <div class="item-txt">
                <h4>照明领域</h4>
                <span></span>
                <p style="color: #ccc">LIGHTING FIELD</p>
              </div>
            </div>
            <div class="swiper-slide">
              <img src="../img/territory-8.jpg" />
              <div class="item-txt">
                <h4>智能穿戴</h4>
                <span></span>
                <p style="color: #ccc">SMART WEARER</p>
              </div>
            </div>
          </div>
        </div>

        <div class="swiper-button-prev" id="btn-prev-area"></div>
        <div class="swiper-button-next" id="btn-next-area"></div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from "swiper";
import myTitle from "@/components/myTitle.vue";
export default {
  components: {
    myTitle,
  },
  methods: {},
  mounted() {
    var mySwiper = new Swiper(".swiper-container", {
      loop: true, // 循环模式选项
      slidesPerView: 5,
      spaceBetween: 20,

      // 如果需要前进后退按钮
      navigation: {
        nextEl: "#btn-prev-area",
        prevEl: "#btn-next-area",
      },
    });
  },
};
</script>

<style lang="scss" scoped>
.area {
  width: var(--width);
  height: 500px;
  background-image: url("http://www.jl-oled.com/Public/Home/images/789.jpg");
  background-attachment: fixed;
  background-size: cover;
  padding-top: 30px;
}
.swiper-container {
  width: 1150px;
  height: 270px;
  --swiper-navigation-size: 5px; /* 设置按钮大小 */
  .swiper-slide {
    background-color: rgb(249, 247, 247);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .item-txt {
      padding-top: 30px;
      text-align: center;
      span {
        display: block;
        margin: 10px auto;
        width: 50px;
        height: 2px;
        border-radius: 5px;
        background-color: #ccc;
      }
    }
  }
}
.swiper-father {
  margin: 0 auto;
  position: relative;
  width: var(--wrap);
  height: 270px;
  #btn-prev-area {
    width: 30px;
    height: 60px;
    border-radius: 50px 0 0 50px;
    background-color: var(--color-zdyblue);
  }
  #btn-next-area {
    width: 30px;
    height: 60px;
    border-radius: 0 50px 50px 0;
    background-color: var(--color-zdyblue);
  }
}
</style>
<style type="text/css">
.swiper-father {
  --swiper-navigation-color: #fff; /* 单独设置按钮颜色 */
  --swiper-navigation-size: 20px; /* 设置按钮大小 */
}
</style>